package conf

import (
	"github.com/caarlos0/env/v6"
	_ "gopkg.in/yaml.v3"
)

var config *Config

func C() *Config {
	if config == nil {
		config = Default()
	}
	return config
}

func LoadConfigFromEnv() error {
	config = C()
	return env.Parse(config)
}
